
<div class="fui-page page-merch-list">
    <div class="fui-content" style="bottom: 2.4rem">
        <div class="fui-searchbar bar">
                <div class="searchbar center">
                    <input type="submit" ng-click="pagedata.getlist()" class="searchbar-cancel searchbtn" value="搜索" />
                    <div class="search-input">
                        <i class="icon icon-search"></i>
                        <input type="search" placeholder="输入关键字..." class="search" ng-model="pagedata.params.keyword">
                    </div>
                </div>
         </div>
        <div id="carousel-container" ng-if="pagedata.pluginset.hdps.length>0" class="carousel slide" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:6rem">
				<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.pluginset.hdps">
					<a href="#">
						<img ng-src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
					</a>
				</div>
			</div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.pluginset.hdps" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>
        <div ng-repeat="value in pagedata.list" class="fui-list store-item" style="background:#fff">
					<div class="fui-list-media">
						<div class="fui-list-media">
							<a ng-click="access_json('/store.detail//id='+value.id)">
								<img ng-src="{{tomedia(value.logo) || '../core/resource/images/nopic.jpg'}}" class="round">
							</a>
						 </div>
					</div>
					<div class="fui-list-inner store-inner">
						<a ng-click="access_json('/store.detail//id='+value.id)">
						<div class="title"> <span class='storename'>{{value.title}}</span></div>
						<div ng-if="value.address!=''" class="text">
							地址: <span class='realname'>{{value.address}}</span>
						</div>
						<div  ng-if="value.mobile!=''" class="text">
							电话: <span class='address'>{{value.mobile}}</span>
						</div>
						<div ng-if="value.catename!=''" class="text">
							营业时间: <span class='address'>{{value.onlinetime.start}} ~ {{value.onlinetime.end}}</span>
						</div>
					  <div class="text location" style="color:green;">
							距离您:{{value.juli}}km
						</div>
						</a>
					</div>
					<div class="fui-list-angle ">
					  <a href="tel:{{value.mobile}}" class='external'><i class=' icon icon-phone' style='color:green'></i></a>
					  <a ng-click="pagedata.openLocation(value)" class='external'><i class='icon icon-map' style='color:#f90'></i></a>
					</div>
				</div>
    </div>

</div>
<script type="text/javascript">
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
// 百度地图API功能
window.scope.location(function(re){
		scope.tool.get_list('jy_weishop/store.index/getlist/lat='+re.lat_lng.lat+'&lng='+re.lat_lng.lng,true);
});
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_weishop/store.index/getlist/');
}
scope.pagedata.openLocation=function(item){
	wx.openLocation({
	latitude: item.lat_lng.lat, // 纬度，浮点数，范围为90 ~ -90
	longitude: item.lat_lng.lng, // 经度，浮点数，范围为180 ~ -180。
		name: item.merchname, // 位置名
		address: item.address, // 地址详情说明
		scale: 20, // 地图缩放级别,整形值,范围从1~28。默认为最大
		infoUrl: '', // 在查看位置界面底部显示的超链接,可点击跳转
		success:function(){
			//alert(1111);
		}
	});
}
</script>